package com.sz.springboot_jpa.cntroller;

import com.sz.springboot_jpa.entity.Customer;
import com.sz.springboot_jpa.mongo.CustomerRepository;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.annotation.Resource;

@Controller
@RequestMapping("mongo")
public class TestController {

    @Resource
    private CustomerRepository customerRepository;
    @RequestMapping("a")
    public String test(){
        Customer customer = customerRepository.findByFirstName("faye");
        return "asd";
    }

}
